package com.cskaoyan.aspect.wx_comment;

import com.cskaoyan.bean.promote.base.PromoteParam;
import com.cskaoyan.bean.wx_comment.Comment;
import com.github.pagehelper.PageHelper;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.util.Date;

/**
 * 类<code>PromoteAspect</code>用于：TODO
 *
 * @author Acher
 * @version 1.0
 * @date 2021/10/23
 */
@Aspect
@Component
public class WxCommentAspect {

    @Around("execution(* com..service..WxCommentServiceImpl.list(..))")
    public Object aroundPromoteQuery(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Comment comment = (Comment) args[0];
        PageHelper.startPage(comment.getPage(),comment.getLimit());
        return joinPoint.proceed();
    }
}
